<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>

    <!-- Styles -->
{{--<link href="{{ asset('css/app.css') }}" rel="stylesheet">--}}

<!-- Scripts -->
    <script>
        window.Laravel = {!! json_encode([
            'csrfToken' => csrf_token(),
        ]) !!};
    </script>
</head>
<style>
    a {
        color: inherit;
        text-decoration: none;
    }
    .header-nav {
        position: relative;
        min-width: 950px;
        overflow: hidden;
        background: #fff;
        border-bottom: 1px solid rgba(30,35,42,.06);
        box-shadow: 0 1px 3px 0 rgba(0,34,77,.05);
        background-clip: content-box;
    }
    .nav-flex {
        position: fixed;
        z-index: 100;
        box-sizing: border-box;
    }
    .nav-content {
        width: 950px;
        margin: 13px auto;
    }
    .navbar-brand {
        margin-bottom: 20px;
        font-size: 26px;
        font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    }
     .home-panel {
         width: 950px;
     }
    .home-panel-left {
        width: 300px;
        float: left;
    }
    .home-panel-right {
        margin-left: 18px;
        width: 630px;
        float: left;
    }
</style>
<body style="background: #f7f8fa;">
<div id="app">
    <nav class="header-nav nav-flex" style="width: 100%; top: 0px; left: 0px;">
        <div class="nav-content">
            <div style="float: left">
                <!-- Branding Image -->
                <a class="navbar-brand" href="{{ url('/') }}">
                    {{ config('app.name', 'Laravel') }}
                </a>
            </div>
            <!-- Right Side Of Navbar -->
            <div style="float: right;">
                <!-- Authentication Links -->
                @if (Auth::guest())
                    <a href="{{ route('login') }}">登录</a>
                    <a href="{{ route('register') }}">注册</a>
                @else
                    <span class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                                {{ Auth::user()->name }} <span class="caret"></span>
                            </a>

                            <ul class="dropdown-menu" role="menu">
                                <li>
                                    <a href="{{ route('logout') }}"
                                       onclick="event.preventDefault();
                                                 document.getElementById('logout-form').submit();">
                                        退出
                                    </a>

                                    <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                                        {{ csrf_field() }}
                                    </form>
                                </li>
                            </ul>
                        </span>
                @endif
            </div>
        </div>
    </nav>
    <div style="display: flex;justify-content: space-around;align-items: center;margin-top: 70px;">
        <div style="width: 950px;">
            <div class="home-panel">
                @if(isset($alerts) && count($alerts))
                @foreach($alerts as $alert)
                <el-alert
                        style="margin-bottom: 10px;"
                        title=""
                        type="{{ $alert['type'] }}"
                        show-icon><a href="{{ isset($alert['link']) ? $alert['link'] : 'javascript:void(0)' }}">{{ $alert['text'] }}</a>
                </el-alert>
                @endforeach
                @endif
                <div class="home-panel-left">
                    <list :list="{{ json_encode($arr) }}" :user="{{ json_encode($user) }}">
                </div>
                <div class="el-card home-panel-right">
                    @yield('content')
                </div>
            </div>
        </div>
    </div>
</div>

<!-- Scripts -->
<script src="{{ asset('js/app.js') }}"></script>
</body>
</html>
